package Abou.eCommerce.eCommerce.service;
import java.util.List;

import Abou.eCommerce.eCommerce.dao.impl.CustomerHome;
import Abou.eCommerce.eCommerce.entities.Customer;

public class CustomerManagerImpl implements CustomerManager {
	
	// customer dao injected by Spring
	private CustomerHome customerDAO;

	// This method will be called when a customer object is added
	public void addCustomer(Customer customer) {
		customerDAO.addCustomer(customer);

	}

	public void delete(Customer customer) {
		customerDAO.delete(customer);

	}

	// This method return list of customer in database

	public List<Customer> getAllCustomers() {
		return customerDAO.getAllcustomers();
	}

	// This setter will be used by Spring context to inject the dao's instance
	public void setCustomerDAO(CustomerHome customerDAO) {
		this.customerDAO = customerDAO;
	}

	public List<Customer> getAllCustomer() {
		// TODO Auto-generated method stub
		return null;
	}

}